import request from '@/utils/request'
//* 获取角色列表
export const getSoleListApi = params => {
  return request.get('/sys/role', { params })
}
//* 添加子级菜单
export const addSoleApi = data => {
  return request.post('/sys/role', data)
}
// * 获取角色详情
export const getSoleInfoApi = id => {
  return request.get('/sys/role/' + id)
}
// * 修改角色
export const editSoleApi = (data, arr) => {
  return request({
    url: '/sys/role/' + arr,
    method: 'put',
    data
  })
}
// * 删除角色详情
export const delSoleInfoApi = id => {
  return request.delete('/sys/role/' + id)
}
